package com.hdl.sqlSession;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * @author hedonglin
 * @date 2020/4/21 21:35
 * @description
 */
public interface SqlSession {
    /**
     * 查询集合
     */
    <E> List<E> selectList(String statementId, Object... params) throws Exception;

    /**
     * 查询单个记录
     */
    <E> E selectOne(String statementId, Object... params) throws Exception;

    /**
     * 新增
     */
    int insert(String statementId, Object... params) throws Exception;
    /**
     * 修改
     */
    int update(String statementId, Object... params) throws Exception;

    /**
     * 删除
     */
    int delete(String statementId, Object... params) throws Exception;

    /**
     *  获取mapper接口代理对象
     */
    <T> T getMapper(Class<T> mapperClass);
}
